<template>
    <div id="postInfo">
        <div class="breadcrumb ">
          <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item>
                <el-tag>采购信息管理</el-tag>
            </el-breadcrumb-item>
             <el-breadcrumb-item>
                <el-tag>发布采购信息</el-tag>
              </el-breadcrumb-item>
          </el-breadcrumb>
        </div>
        <div class="form">
            <el-form ref="form" :model="form" label-width="80px">
              <el-form-item label="订单号">
                <el-input v-model="form.gname"></el-input>
              </el-form-item>
              <el-form-item label="收货人">
                <el-input v-model="form.phone"></el-input>
              </el-form-item>
              <el-form-item label="">
                <el-input v-model="form.email"></el-input>
              </el-form-item>
              <el-form-item label="地址">
                <el-input v-model="form.dizhi"></el-input>
              </el-form-item>
               <el-form-item>
                  <el-button type="primary" @click="onSubmit">立即发布</el-button>
                </el-form-item>
            </el-form>
        </div>
    </div>
</template>
<script>
  import { addGongyingshang } from './../../../service/api/index.js'
  export default {
    data() {
      return {
           form:{
             gname:'',
             phone:'',
             email:'',
             dizhi:'',
           }

      };
    },
    methods: {
      async onSubmit() {
            //console.log(this.form.vname);
           let result = await addGongyingshang(this.form.gname,this.form.phone,this.form.email,this.form.dizhi);      
            console.log(result);
        }
    }
  }
</script>>
<style lang="less" scope>
   #postInfo{
     width:100%;
     height:100%;
     background-color:#f5f5f5;
   }

    .breadcrumb {
     margin-right: 0.2rem;
     margin-left: 0.2rem;
     margin-top: 0.1rem;
     margin-bottom: 0.1rem;
     background-color:white;
     padding: 0.06rem;
     height:0.6rem;
     border-radius: 4px
   }
    
    .form{
      margin-left: 4rem;
      margin-right: 4rem;
   }
</style>